home *** CD-ROM | disk | FTP | other *** search
- on startMovie
- unloadMovie("spiceone.dir")
- initialiseGame()
- end
-
- on stopMovie
- repeat with x = 1 to 48
- set the visible of sprite x to 1
- updateStage()
- end repeat
- clearGlobals()
- end
-
- on initialiseGame
- global PUZZLEPIECESDONE, BOARDPOS, LOOPFRAME, QUESTIONS, MOVIES, VIDVOLUME, score, STANDARDCURSOR, GAMESDONE, PRINTLIST, BOMBRATE, movieTime
- set movieTime to 0
- set BOMBRATE to random(2)
- set PRINTLIST to EMPTY
- set VIDVOLUME to 250
- set LOOPFRAME to EMPTY
- set PUZZLEPIECESDONE to 0
- set BOARDPOS to 1
- set score to 0
- set GAMESDONE to 0
- set QUESTIONS to "1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17"
- set MOVIES to EMPTY
- set STANDARDCURSOR to -1
- set the soundLevel to 6
- repeat with x = 1 to the number of castMembers of castLib "QT video"
- put x & "," after MOVIES
- end repeat
- delete char the number of chars in MOVIES of MOVIES
- end
-
- on initialiseFrame
- global LOOPFRAME, STANDARDCURSOR, BOMBRATE
- set LOOPFRAME to the frameLabel
- repeat with spriteNo = 1 to 120
- set the visible of sprite spriteNo to 1
- end repeat
- if the memberNum of sprite 54 <> 0 then
- set the movieRate of sprite 54 to BOMBRATE
- end if
- set the cursor of sprite 2 to 0
- set the visible of sprite 52 to 0
- set the visible of sprite 53 to 0
- set the visible of sprite 71 to 0
- set the visible of sprite 72 to 0
- set the visible of sprite 90 to 0
- set the visible of sprite 91 to 0
- set the visible of sprite 92 to 0
- updateStage()
- cursor(STANDARDCURSOR)
- end
-
- on checkRollOvers
- set the visible of sprite 52 to rollOver(52)
- set the visible of sprite 53 to rollOver(53)
- updateStage()
- if rollOver(53) then
- set the memberNum of sprite 71 to the memberNum of sprite 71 + 1
- set the visible of sprite 71 to 1
- updateStage()
- repeat while rollOver(53)
- end repeat
- set the visible of sprite 71 to 0
- set the memberNum of sprite 71 to the memberNum of sprite 71 - 1
- unLoad(member the name of member (the memberNum of sprite 71 + 1))
- else
- if rollOver(52) then
- set the memberNum of sprite 72 to the memberNum of sprite 72 + 1
- set the visible of sprite 72 to 1
- updateStage()
- repeat while rollOver(52)
- end repeat
- set the visible of sprite 72 to 0
- set the memberNum of sprite 72 to the memberNum of sprite 72 - 1
- unLoad(member the name of member (the memberNum of sprite 72 + 1))
- end if
- end if
- updateStage()
- end
-
- on doButton
- set outBtnNo to the memberNum of sprite the clickOn
- set inBtnNo to outBtnNo + 1
- repeat while the mouseDown
- if rollOver(the clickOn) then
- set the memberNum of sprite the clickOn to inBtnNo
- else
- set the memberNum of sprite the clickOn to outBtnNo
- end if
- updateStage()
- end repeat
- set btnState to rollOver(the clickOn)
- if btnState then
- puppetSound("twink")
- end if
- set the memberNum of sprite the clickOn to outBtnNo
- updateStage()
- return btnState
- end
-
- on returnToMainGame frameLabel
- go("game board")
- end
-
- on congratulations
- startTimer()
- setScore(50)
- set the memberNum of sprite 90 to the memberNum of sprite 90 + 1
- set the visible of sprite 90 to 1
- set the visible of sprite 91 to 1
- updateStage()
- set the movieTime of sprite 91 to 0
- set the movieRate of sprite 91 to 1
- puppetSound("clapping")
- repeat while the timer < 180
- updateStage()
- end repeat
- set the movieTime of sprite 91 to 0
- set the movieRate of sprite 91 to 0
- set the visible of sprite 90 to 0
- set the visible of sprite 91 to 0
- set the memberNum of sprite 90 to the memberNum of sprite 90 - 1
- updateStage()
- unLoad(member the name of member (the memberNum of sprite 90 + 1))
- end
-
- on setScore amount
- global score
- if amount <> VOID then
- set score to amount + score
- end if
- set textScore to string(score)
- repeat with x = 1 to 4
- if the number of chars in textScore = 4 then
- exit repeat
- end if
- put "0" before textScore
- end repeat
- repeat with x = 1 to 4
- set the member of sprite (80 + x) to "score" && string(char x of textScore)
- end repeat
- updateStage()
- end
-